package bigdata.task;

import datacenterbizapiexternal.weather.domain.BaiduWeatherResponseParams;
import datacenterbizapiexternal.weather.service.BaiduWeatherService;
import org.springframework.beans.factory.annotation.Autowired;

public class BaiduWeatherTask {

	@Autowired
	private BaiduWeatherService baiduWeatherService;

	public void syncWeatherData() {
		BaiduWeatherResponseParams guanlingWeather = baiduWeatherService
				.getGuanlingWeather();
		baiduWeatherService.insertResponse(guanlingWeather);

		BaiduWeatherResponseParams anshunWeather = baiduWeatherService
				.getAnshunWeather();
		baiduWeatherService.insertResponse(anshunWeather);
	}
}
